import React from 'react';
import ThreeDServerRoom from './ThreeDServerRoom';
import { CabinetData, EnvironmentalSensor, PowerDevice, HVACDevice } from '../../types';

interface ServerRoom3DViewProps {
  cabinets: CabinetData[];
  environmentalSensors: EnvironmentalSensor[];
  powerDevices: PowerDevice[];
  hvacDevices: HVACDevice[];
  onCabinetSelect: (cabinetId: string) => void;
  selectedCabinetId?: string;
}

/**
 * 3D服务器机房视图组件
 * @param props 组件属性
 * @returns 3D服务器机房视图JSX
 */
const ServerRoom3DView: React.FC<ServerRoom3DViewProps> = ({
  cabinets,
  environmentalSensors,
  powerDevices,
  hvacDevices,
  onCabinetSelect,
  selectedCabinetId
}) => {
  return (
    <ThreeDServerRoom 
      cabinets={cabinets} 
      environmentalSensors={environmentalSensors}
      powerDevices={powerDevices}
      hvacDevices={hvacDevices}
      onCabinetSelect={onCabinetSelect}
      selectedCabinetId={selectedCabinetId}
    />
  );
};

export default ServerRoom3DView;